package practice3;

public class Point3D extends Point2D {
	float z = 0.0f;
	public Point3D(){
		
	}
	
    public Point3D(float x, float y, float z){
    	this.x = x;
    	this.y = y;
    	this.z = z;
	}
    
    public float getZ(){
    	return z;
    }
    
    public void setZ(float z){
    	this.z = z;
    }
    
    public void setXYZ(float x, float y, float z){
    	this.x = x;
    	this.y = y;
    	this.z = z;
    }
    
    public float[] getXYZ(){
    	float[] XYZ = new float[3];
    	XYZ[0] = x;
    	XYZ[1] = y;
    	XYZ[2] = z;
    	return XYZ;
    }
    
    public String toString(){
    	return "( " + x + " , " + y + " , " + z + " )";
    }

}
